/*
 * @Author: 张小平
 * @Date:   2025-05-01
 * @Email:  qqshuqian@163.com
 * @Copyright © 2024 aseyun. All rights reserved.
 */
import request from '@/framework-core/axios';
import website from '@/framework-core/config/website';

const apiFormPropertyList = (params) => {
  return request.get(website.baseCodeApiUrl + '/api/flow/task-from-property/list', {
    params
  })
}

const apiButtonList = (params) => {
  return request.get(website.baseCodeApiUrl +'/api/flow/task-button/list', {
    params
  })
}

const apiFormContactPerson = (params) => {
  return request.get(website.baseCodeApiUrl +'/api/flow/task-from-property/form-field-contact-person', {
    params
  })
}



const apiFieldBranchCondition = (params) => {
  return request.get(website.baseCodeApiUrl +'/api/flow/task-from-property/form-field-branch-condition', {
    params
  })
}


/**
 * 我的待办
 * @param params
 */
const apiMyTodo = (query) => {
  return request({
    url: website.baseUrl+'/api/flow/flow-ext/my-todo',
    method: 'post',
    data: query
  })
}

/**
 * 查询待我的申请
 * @param params
 */
const apiMyApply = (query) => {
  return request({
    url: website.baseUrl+'/api/flow/flow-ext/my-apply',
    method: 'post',
    data: query
  })
}

/**
 * 查询抄送到我的流程
 * @param params
 */
const apiMyCc = (query) => {
  return request({
    url: website.baseUrl+'/api/flow/flow-ext/my-cc',
    method: 'post',
    data: query
  })
}


/**
 * 查询待我认领的任务
 * @param params
 */
const apiMyClaim = (query) => {
  return request({
    url: website.baseUrl+'/api/flow/flow-ext/my-claim',
    method: 'post',
    data: query
  })
}


/**
 * 查询我的任务和待我认领的任务
 * @param params
 */
const apiMyTodoClaim = (query) => {
  return request({
    url: website.baseUrl+'/api/flow/flow-ext/my-todo-and-claim',
    method: 'post',
    data: query
  })
}


const apiMyApp = (query) => {
  return request({
    url: website.baseUrl+'/api/flow/proc/page',
    method: 'post',
    data: query
  })
}



export default {
  apiFormPropertyList,
  apiButtonList,
  apiFormContactPerson,
  apiFieldBranchCondition,
  apiMyTodo,
  apiMyApply,
  apiMyCc,
  apiMyClaim,
  apiMyTodoClaim,
  apiMyApp
}
